package com.yzj.Client;

import com.yzj.pojo.Emp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(name = "cloud-zuul9001",fallback = EmpClientImpl.class,path = "/empprovider")
public interface EmpClient {
    @GetMapping("/hello/{name}")
    public String hello(@PathVariable(value = "name")String name,@RequestHeader(name="token") String token);

    @PostMapping("/selectOne")
    public Emp selectOne(@SpringQueryMap Emp emp);

    @PostMapping("/map")
    public Map<String,Object> map(@RequestParam Map<String,Object> map);

}
